<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="Cache-control" content="no-cache" />
    <title>搜索</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <meta http-equiv="Expires" content="-1">
    <meta http-equiv="Pragma" content="no-cache">
    <meta name="description" content="">
    <meta name="keywords" content="" />
    <link rel="stylesheet" type="text/css" href="static/css/aui.2.0.css">
    <style type="text/css">
    #search{
        position: relative;
    }
    #form{
        width: calc(100% - .95rem);
    }
    #keyword{
        width: 100%;
    }
    .keyword-list a{
        display: inline-block;
    }
    </style>
</head>
<body>
	<header class="aui-bar aui-bar-nav" style="background-color: #3c445e;">
        <a onclick="history.back()" class="aui-pull-left">
            <i class="aui-iconfont aui-icon-left"></i>
        </a>
        <div class="aui-title">帖子搜索</div>
    </header>

    <div class="aui-searchbar" id="search">
        <div class="aui-searchbar-input aui-border-radius">
            <i class="aui-iconfont aui-icon-search"></i>
            <form id="form" action="javascript:search();">
                <input type="search" placeholder="请输入搜索内容" id="keyword">
            </form>
        </div>
        <div class="aui-searchbar-cancel">取消</div>
    </div>

    <div class="bg-f aui-padded f14">
        热词推荐
    </div>

    <div class="bg-f keyword-list">
        <a class="aui-padded f14" href="javascript:gotoResultPage('威锋十周年');">威锋十周年</a>
        <a class="aui-padded f14" href="javascript:gotoResultPage('金狮奖');">金狮奖</a>
        <a class="aui-padded f14" href="javascript:gotoResultPage('iPhone7');">iPhone7</a>
        <a class="aui-padded f14" href="javascript:gotoResultPage('CleanMyMac');">CleanMyMac</a>
        <a class="aui-padded f14" href="javascript:gotoResultPage('vpn');">vpn</a>
        <a class="aui-padded f14" href="javascript:gotoResultPage('10.2越狱');">10.2越狱</a>
        <a class="aui-padded f14" href="javascript:gotoResultPage('习近平');">习近平</a>
        <a class="aui-padded f14" href="javascript:gotoResultPage('翻墙');">翻墙</a>
        <a class="aui-padded f14" href="javascript:gotoResultPage('10.2越狱插件');">10.2越狱插件</a>
        <a class="aui-padded f14" href="javascript:gotoResultPage('10.2越狱教程');">10.2越狱教程</a>
        <a class="aui-padded f14" href="javascript:gotoResultPage('手机 丢 ');">手机 丢 </a>
        <a class="aui-padded f14" href="javascript:gotoResultPage('监控 手机');">监控 手机</a>
        <a class="aui-padded f14" href="javascript:gotoResultPage('NTFS');">NTFS</a>
        <a class="aui-padded f14" href="javascript:gotoResultPage('壁纸');">壁纸</a>
        <a class="aui-padded f14" href="javascript:gotoResultPage('迅雷');">迅雷</a>
        <a class="aui-padded f14" href="javascript:gotoResultPage('10.2.1越狱');">10.2.1越狱</a>
        <a class="aui-padded f14" href="javascript:gotoResultPage('大数据');">大数据</a>
        <a class="aui-padded f14" href="javascript:gotoResultPage('越狱');">越狱</a>
        <a class="aui-padded f14" href="javascript:gotoResultPage('ios11');">ios11</a>
        <a class="aui-padded f14" href="javascript:gotoResultPage('免流网速');">免流网速</a>
        <a class="aui-padded f14" href="javascript:gotoResultPage('广州 公安');">广州 公安</a>
        <a class="aui-padded f14" href="javascript:gotoResultPage('张高丽');">张高丽</a>
        <a class="aui-padded f14" href="javascript:gotoResultPage('王者');">王者</a>
    </div>
</body>
<script type="text/javascript">
    var searchBar = document.querySelector(".aui-searchbar-input");
    if(searchBar){
        searchBar.onclick = function(){
            document.querySelector(".aui-searchbar-cancel").style.marginRight = 0;
        }
    }
    document.querySelector(".aui-searchbar-cancel").onclick = function(){
        this.style.marginRight = "-"+this.offsetWidth+"px";
        document.getElementById("keyword").value = '';
        document.getElementById("keyword").blur();
    }

    function search(){
        var searchValue = document.getElementById("keyword").value;
        if(searchValue){
            gotoResultPage(searchValue);
            alert("您输入的内容是:"+searchValue);
        }
    }

    function gotoResultPage(keyword){
        location.assign('search.html?keyword=' + keyword);
    }
</script>
</html>

